package com.sikaryofficial.backend.domain.dto.resp;

import com.sikaryofficial.backend.annotation.LikesDataFormat;
import com.sikaryofficial.backend.constant.ContentStatusEnum;
import com.sikaryofficial.common.core.annotation.LocalDateTimeFormat;
import com.sikaryofficial.system.api.model.att.AttachmentResp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 品牌口味评价对象
 *
 * @author qinjinyuan
 * @date 2023-10-30
 */
@Getter
@Setter
@ToString
@ApiModel(value = "评价回复出参", description = "评价回复出参")
public class EvaluateReplyDTO {
    @ApiModelProperty(value = "序号")
    private int seqNo;
    /**
     * 状态
     */
    @ApiModelProperty(value = "状态 0-正常 1-屏蔽 2-举报")
    private int status;

    /**
     * 是否屏蔽：0-否，1-是，默认未屏蔽
     */
    private Integer hasBlocked;

    public String getStatusDesc() {
        ContentStatusEnum statusEnum = ContentStatusEnum.getNameByCode(status);
        if (Objects.nonNull(statusEnum)) {
            return statusEnum.getName();
        }
        return "";
    }

    /**
     * 创建者
     *
     */
    @ApiModelProperty(value = "创建者",  example = "12.2435")
    private String createdName;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "创建者",  example = "12.2435")
    private Long createdBy;

    /**
     * 创建时间, 伦敦所在的时区为GMT+1，也被称为西一区
     */
    @LocalDateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间",  example = "12.2435")
    private Date createdTime;

    /** 评价回复ID */
    @ApiModelProperty(value = "评价回复ID",  example = "12.2435")
    private Long evaluateReplyId;

    /** 评价ID */
    @ApiModelProperty(value = "评价ID",  example = "12.2435")
    private Long evaluateId;

    /**
     * 回复内容
     */
    @ApiModelProperty(value = "回复内容",  example = "12.2435")
    private String replyContent;

    /**
     * 评价图片
     */
    @ApiModelProperty(value = "评价图片",  example = "12.2435")
    private List<AttachmentResp> attachmentList;

    /**
     * 点赞统计
     */
    @ApiModelProperty(value = "点赞统计",  example = "123")
    @LikesDataFormat
    private Integer likesCount;

    /**
     * 是否有我的点赞
     */
    @ApiModelProperty(value = "是否有我的点赞")
    private boolean hasOwnerLikes;

    @ApiModelProperty(value = "个人图像-统一默认头像")
    private String avatar;

    @ApiModelProperty(value = "评价")
    private BrandTasteEvaluateDTO evaluate;


}
